import 'package:flutter/material.dart';
import 'package:getwidget/getwidget.dart';

class MyPro extends StatefulWidget {
  @override
  _MyProState createState() => _MyProState();
}

class _MyProState extends State<MyPro> {
  int groupValue = 0;
  List imageList = ['lib/assets/bg_login.jpg'];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      //appBar: AppBar(title: Text("个人中心")),
      body: Container(
        color: Colors.orange,
        alignment: Alignment.center,
        child: ListView(
          children: [
            GFRadio(
              size: GFSize.SMALL,
              value: 2,
              groupValue: groupValue,
              onChanged: (value) {
                setState(() {
                  groupValue = 11;
                });
              },
              inactiveIcon: null,
              activeBorderColor: GFColors.SUCCESS,
              radioColor: GFColors.SUCCESS,
            ),
            GFCard(
                content: Row(
              mainAxisAlignment: MainAxisAlignment.spaceBetween,
              children: <Widget>[
                GFRadio(
                  size: GFSize.LARGE,
                  activeBorderColor: GFColors.SUCCESS,
                  value: 0,
                  groupValue: groupValue,
                  onChanged: (val) {
                    setState(() {
                      groupValue = 1;
                    });
                  },
                  inactiveIcon: null,
                  radioColor: GFColors.SUCCESS,
                ),
                GFRadio(
                  size: GFSize.MEDIUM,
                  value: 1,
                  groupValue: groupValue,
                  onChanged: (value) {
                    setState(() {
                      groupValue = 1;
                    });
                  },
                  inactiveIcon: null,
                  activeBorderColor: GFColors.SUCCESS,
                  radioColor: GFColors.SUCCESS,
                ),
                GFRadio(
                  size: GFSize.SMALL,
                  value: 2,
                  groupValue: groupValue,
                  onChanged: (value) {
                    setState(() {
                      groupValue = 1;
                    });
                  },
                  inactiveIcon: null,
                  activeBorderColor: GFColors.SUCCESS,
                  radioColor: GFColors.SUCCESS,
                ),
                GFRadio(
                  size: 20,
                  value: 3,
                  groupValue: groupValue,
                  onChanged: (value) {
                    setState(() {
                      groupValue = 1;
                    });
                  },
                  inactiveIcon: null,
                  activeBorderColor: GFColors.SUCCESS,
                  radioColor: GFColors.SUCCESS,
                ),

              ],
            )),
            GFRadioListTile(
              titleText: 'Arthur Shelby',
              subTitleText: 'By order of the peaky blinders',
              avatar: GFAvatar(
                backgroundImage: AssetImage('lib/assets/bg_login.jpg'),
              ),
              size: 25,
              activeBorderColor: Colors.green,
              focusColor: Colors.green,
              type: GFRadioType.square,
              value: 0,
              groupValue: groupValue,
              onChanged: (value) {
                setState(() {
                  groupValue = value;
                });
              },
              inactiveIcon: null,
            ),
            GFRadioListTile(
              titleText: 'Arthur Shelby',
              value: 1,
              avatar: GFAvatar(
                backgroundImage: AssetImage('lib/assets/bg_login.jpg'),
              ),
              size: 25,
              activeBorderColor: Colors.green,
              focusColor: Colors.green,
              type: GFRadioType.square,
              groupValue: groupValue,
              onChanged: (value) {
                setState(() {
                  groupValue = value;
                });
              },
              inactiveIcon: null,
            ),

          ],
        ),
      ),
    );
  }
}
